<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="../js/jquery-1.4.2.js"></script>
<script type="text/javascript">
    $(function () {
              $("button").click(function () {
              var url="GetTicket";
              $.get(url,function (ticket) {
              var src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+ticket;
              $("img").attr("src",src);
              })
              })
    })
</script>
<body>
<button>生成二维码</button>
<img alt="" src="">
</body>
</html>